/*
* @Author: lyq
* @Date:   2018-08-03 15:24:03
* @Last Modified by:   lyq
* @Last Modified time: 2018-08-03 15:24:03
*
* 小程序配置文件
*/

import * as config_local from './config_local'
var socketHost = ""
var host = ""  //服务器地址
if (config_local.host) {
  host = config_local.host
}

var config = {
  //socket服务器地址
  socketHost,
  //appid
  appid: "wx8f9032e368a4388a",
  appName: "和之初",
  productName: '和之初',
  //接口地址
  host,  
  /**
   * 登录授权
   */
  //用code换区openID
  openIdUrl: `${host}/api/wx/login`,

  //本地测试登录接口
  testLoginUrl: `${host}/api/test/login`,

  //活动列表
  activityLsit: `${host}/api/campagin/campaigns`,
  //获取图片上传token地址
  tokenUrl:`${host}/dmz/qiniu/token`,
  //获取文章列表数据
  articlesList: `${host}/api/share/articles`,

  //渲染文章，获取文章数据***从文章列表点击进入文章详情页
  formListArticle: `${host}/api/share/companyArticle`,
  //渲染文章，获取文章数据***从用户分享点击进入文章详情页
  formUserArticle: `${host}/api/share/article`,
  
  //文章点赞接口
  articleThumb: `${host}/api/share/thumbUp`,
  //获取用户信息
  userInfo: `${host}/api/share/user`,
  //修改用户数据
  midUserInfo: `${host}/api/share/create`,
  //员工列表
  playData: `${host}/api/campagin/players`,
  //员工详情
  manInfo: `${host}/api/campagin/player`,
  //投票
  voteMan: `${host}/api/campagin/ticket`,
  request: {
    duration: 2000
  },
  toastDuration: 3000
};

for (var key in config_local.default) {
  config[key] = config_local.default[key]
}

module.exports = config